<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui">

	<p:growl id="growl" showDetail="false" globalOnly="true" life="6000"
		autoUpdate="true" />
	<p:dialog header="#{msg.caixa_operation_modal_header}"
		widgetVar="new_caixa_operation_modal" modal="true" resizable="false"
		width="450" id="newAlunoModal">

		<h:form id="formOperation">

			<h:panelGrid cellpadding="10">
				<p:row>
					<h:outputLabel value="#{msg.label_name}"
						styleClass="labelsPanelGrid" />
					<p:inputText maxlength="100" size="60"
						value="#{addStudentController.student.nome}" />
				</p:row>

				<p:row>
					<h:outputLabel value="#{msg.label_address}"
						styleClass="labelsPanelGrid" />
					<p:inputText maxlength="100" size="60"
						value="#{addStudentController.student.endereco}" />
				</p:row>

				<p:row>
					<label class="inlineFieldsPanelGrid"> <h:outputLabel
							value="#{msg.label_number}" styleClass="labelsPanelGrid" /> <p:inputText
							maxlength="5" size="5"
							value="#{addStudentController.student.numero}" />
					</label>

					<label class="inlineFieldsPanelGrid"> <h:outputLabel
							value="#{msg.label_neighbor}" styleClass="labelsPanelGrid" /> <p:inputText
							maxlength="40" size="47"
							value="#{addStudentController.student.bairro}" />
					</label>
				</p:row>

				<p:row>
					<label class="inlineFieldsPanelGridComboBox"> <h:outputLabel
							value="#{msg.label_state}" styleClass="labelsPanelGrid" /> <p:selectOneMenu
							id="uf" value="#{addStudentController.student.cidade.uf.id}">
							<f:selectItem itemLabel="..." itemValue="" />
							<p:ajax update="cidade"
								listener="#{addStudentController.ufChanged}" event="change" />
							<f:selectItems itemValue="#{model.id}" var="model"
								itemLabel="#{model.sigla}"
								value="#{addStudentController.listOfUf}" />
						</p:selectOneMenu>
					</label>

					<label class="inlineFieldsPanelGridComboBox"> <h:outputLabel
							value="#{msg.label_city}" styleClass="labelsPanelGrid" /> <p:selectOneMenu
							id="cidade" value="#{addStudentController.student.cidade.id}">
							<f:selectItem
								itemLabel="#{addStudentController.student.cidade.nome}"
								itemValue="#{addStudentController.student.cidade.id}" />
							<f:selectItems itemValue="#{model.id}" var="model"
								itemLabel="#{model.nome}"
								value="#{addStudentController.listOfCities}" />
						</p:selectOneMenu>
					</label>
				</p:row>

				<p:row>
					<label class="inlineFieldsPanelGridComboBox"> <p:outputLabel
							for="nascimento" value="#{msg.label_birthday}"
							styleClass="labelsPanelGrid" /> <p:calendar id="nascimento"
							value="#{addStudentController.student.dataNascimento}"
							pattern="dd-MM-yyyy" mask="true" />
					</label>

					<label class="inlineFieldsPanelGridComboBox"> <h:outputLabel
							for="sexo" value="#{msg.label_gender}"
							styleClass="labelsPanelGrid" /> <p:selectOneMenu id="sexo"
							value="#{addStudentController.student.sexo}">
							<f:selectItem itemLabel="#{msg.label_female}" itemValue="F" />
							<f:selectItem itemLabel="#{msg.label_male}" itemValue="M" />
						</p:selectOneMenu>
					</label>
				</p:row>

				<p:row>
					<label class="inlineFieldsPanelGrid"> <h:outputLabel
							value="#{msg.label_cpf}" styleClass="labelsPanelGrid" /> <p:inputMask
							maxlength="14" size="20"
							value="#{addStudentController.student.cpf}" mask="999.999.999-99" />
					</label>

					<label class="inlineFieldsPanelGrid"> <h:outputLabel
							value="#{msg.label_rg}" styleClass="labelsPanelGrid" /> <p:inputText
							maxlength="14" size="25"
							value="#{addStudentController.student.rg}" />
					</label>
				</p:row>

				<p:row>
					<label class="inlineFieldsPanelGrid"> <h:outputLabel
							value="#{msg.label_phone}" styleClass="labelsPanelGrid" /> <p:inputMask
							maxlength="13" size="20"
							value="#{addStudentController.student.tel}" mask="(99)9999-9999" />
					</label>

					<label class="inlineFieldsPanelGrid"> <h:outputLabel
							value="#{msg.label_mobile}" styleClass="labelsPanelGrid" /> <p:inputMask
							maxlength="13" size="25"
							value="#{addStudentController.student.cel}" mask="(99)9999-9999" />
					</label>
				</p:row>
			</h:panelGrid>
	</p:dialog>

	<script type="text/javascript"
		src="${facesContext.externalContext.requestContextPath}/js/jquery/jquery.maskedinput.min.js"></script>

</ui:composition>
